package com.lbd.smsplatform.bean;

import com.lbd.base.bean.AbstractEntity;
import lombok.*;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * Created by wang on 2016/9/23.
 */
@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
@DynamicUpdate
@Entity
public class SmsLog extends AbstractEntity {

    //发件人
    private String sender;

    //发件人IP
    private String senderIp;

    //发件人设备号
    private String imei;

    //接收人
    @NotNull
    @Pattern(regexp = "^1\\d{10}$", message = "请输入正确的手机号码。")
    private String recipient;

    //短信消息
    @NotNull
    private String msgText;

    //短信类型
    private Integer msgType;


    //短信备注
    private String remark;


}
